package ch2;

import java.util.Scanner;

public class Ex6 {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        System.out.println("输入一个数字：");
        int c = console.nextInt();
        int cc = c % 10;
        int ccx = c / 10 % 10;
        int ccxx = ccx % 10;
        int sum = (cc + ccx + ccxx);
        System.out.println("数字的和：" + sum);
    }
}
